home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / knowhow4 / objkit.h < prev    next >
C/C++ Source or Header  |  1994-10-10  |  1KB  |  42 lines

  1. /* OBJKIT.H   Class for keeping pointers to objects of the Visible family.
  2.    Start point for any application objects, like "Menu-With-Buttons" etc.
  3.    call exe() of current object with argument act, which modifies this function
  4.    See manual for details.
  5. */
  6.  
  7. #ifndef __OBJECT_KIT_H_
  8. #define __OBJECT_KIT_H_
  9.  
  10. #include "kit.h"
  11. #include "global.h"
  12.  
  13. class ObjectKit : public Kit, public Visible
  14.     {
  15.     public:
  16.     void assign(Visible* toCall,     // Leaving object "callFrom", with OK - like command, we will process
  17.             Visible* callFrom,   // user-defined function "application(act_type)" from file "appl.cpp"
  18.             int act_type);       // or something like that; if return value permits, then go to "toCall"
  19.                      // object
  20.  
  21.     void set_point(Visible* s, Visible* t)  // Leaving object "s", with
  22.         {                                   // OK - like command, we will
  23.         s->set_point(get(t));               // go to "t" object
  24.         }
  25.  
  26.     int act_ret();
  27.         void set_ret(int r) { ret = r; }
  28.     virtual void exe(int act = 0);
  29.     virtual void show();
  30.     virtual rect bound()         // 0-th "supply" object is the "pseudo-
  31.         {                        // window", all objects, belonging to
  32.         return list[0]->bound(); // container are in this area
  33.         }
  34.     virtual void repose(rect rec)
  35.         {
  36.         list[0]->repose(rec);
  37.         rearrange();
  38.         }
  39.     virtual void rearrange() {}  // if we resize or move base window
  40.     };
  41.  
  42. #endif __OBJECT_KIT_H_